package com.chief.openfeign.controller;

import com.chief.openfeign.OpenFeignTestService;
import com.chief.openfeign.gateway.OpenFeignGatewayTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class TestPageController {

    @Autowired
    private OpenFeignTestService openFeignTestService;
    @Autowired
    private OpenFeignGatewayTestService openFeignGatewayTestService;

    @RequestMapping("/home")
    public ModelAndView home(){
        ModelAndView test = new ModelAndView("home");
        test.addObject("a", "000000");
        test.addObject("test",this.openFeignTestService.openFeignTest("888888"));
        test.addObject("gateway",this.openFeignGatewayTestService.test());
        return test;
    }
}
